//
//  TDConvenientViewController.m
//  TFB
//
//  Created by Nothing on 15/3/16.
//  Copyright (c) 2015年 TD. All rights reserved.
//

#import "TDConvenientViewController.h"


@interface TDConvenientViewController ()

@end

@implementation TDConvenientViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.navigationItem.title = @"便民";
    
    NSString * strModel  = [UIDevice currentDevice].model;
    if ([strModel isEqualToString:@"iPhone 4S"]) {
        self.bgScrollView.contentSize = CGSizeMake(SVFS.width, SVFS.height + 40);
    }
    

    [self creatUI];
}

- (void)creatUI
{
    
    
    
    self.zhuanZhangView.userInteractionEnabled = YES;
    self.zhuanZhangView.tag = ZhuanZhangViewTag;
    UITapGestureRecognizer *zhuanZhangViewTap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(tapClick:)];
    zhuanZhangViewTap.delegate = self;
    zhuanZhangViewTap.numberOfTapsRequired = 1;
    [self.zhuanZhangView addGestureRecognizer:zhuanZhangViewTap];
    
    self.shouJiChongZhiView.userInteractionEnabled = YES;
    self.shouJiChongZhiView.tag = ShouJiCZViewTag;
    UITapGestureRecognizer *shouJiChongZhiViewTap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(tapClick:)];
    [self.shouJiChongZhiView addGestureRecognizer:shouJiChongZhiViewTap];
    
    self.shuiDianView.userInteractionEnabled = YES;
    self.shuiDianView.tag = ShuiDianViewTag;
    UITapGestureRecognizer *shuiDianViewTap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(tapClick:)];
    [self.shuiDianView addGestureRecognizer:shuiDianViewTap];

    self.lvYouView.userInteractionEnabled = YES;
    self.lvYouView.tag = LvYouViewTag;
    UITapGestureRecognizer *lvYouViewTap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(tapClick:)];
    [self.lvYouView addGestureRecognizer:lvYouViewTap];

    self.huoChePiaoView.userInteractionEnabled = YES;
    self.huoChePiaoView.tag = HuoChePiaoViewTag;
    UITapGestureRecognizer *huoChePiaoViewTap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(tapClick:)];
    [self.huoChePiaoView addGestureRecognizer:huoChePiaoViewTap];

    self.feiJiPiaoView.userInteractionEnabled = YES;
    self.feiJiPiaoView.tag = FeiJiPiaoViewTag;
    UITapGestureRecognizer *feiJiPiaoViewTap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(tapClick:)];
    [self.feiJiPiaoView addGestureRecognizer:feiJiPiaoViewTap];

    self.caiPiaoView.userInteractionEnabled = YES;
    self.caiPiaoView.tag = CaiPiaoViewTag;
    UITapGestureRecognizer *caiPiaoViewTap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(tapClick:)];
    [self.caiPiaoView addGestureRecognizer:caiPiaoViewTap];

    self.jiuDianView.userInteractionEnabled = YES;
    self.jiuDianView.tag = JiuDianYDViewTag;
    UITapGestureRecognizer *jiuDianViewTap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(tapClick:)];
    [self.jiuDianView addGestureRecognizer:jiuDianViewTap];

    self.tuanGouView.userInteractionEnabled = YES;
    self.tuanGouView.tag = TuanGouViewTag;
    UITapGestureRecognizer *tuanGouViewTap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(tapClick:)];
    [self.tuanGouView addGestureRecognizer:tuanGouViewTap];
    
}


- (void)tapClick:(UITapGestureRecognizer *)sender
{
    UIView *view = [sender view];
    switch (view.tag) {
        case ZhuanZhangViewTag:
        {
            NSLog(@"%ld", (long)view.tag);
        }
            break;
        case ShouJiCZViewTag:
        {
            NSLog(@"%ld", (long)view.tag);

        }
            break;
        case ShuiDianViewTag:
        {
            NSLog(@"%ld", (long)view.tag);

        }
            break;
        case LvYouViewTag:
        {
            NSLog(@"%ld", (long)view.tag);

        }
            break;
        case HuoChePiaoViewTag:
        {
            NSLog(@"%ld", (long)view.tag);

        }
            break;
        case FeiJiPiaoViewTag:
        {
            NSLog(@"%ld", (long)view.tag);

        }
            break;
        case CaiPiaoViewTag:
        {
            NSLog(@"%ld", (long)view.tag);

        }
            break;
        case JiuDianYDViewTag:
        {
            NSLog(@"%ld", (long)view.tag);

        }
            break;
        case TuanGouViewTag:
        {
            NSLog(@"%ld", (long)view.tag);

        }
            break;
            
        default:
            break;
    }
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
}



@end
